package com.jxc.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.jxc.VO.Attributes;

import java.util.List;

public class Menu {

/*    id：节点ID，对加载远程数据很重要。
    text：显示节点文本。
    state：节点状态，'open' 或 'closed'，默认：'open'。如果为'closed'的时候，将不自动展开该节点。
    checked：表示该节点是否被选中。
    attributes: 被添加到节点的自定义属性。
    children: 一个节点数组声明了若干节点。*/
    private boolean checked;

    private Attributes attributes;//封装其它字段

    private List<Menu> children;

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public Attributes getAttributes() {
        return attributes;
    }

    public void setAttributes(Attributes attributes) {
        this.attributes = attributes;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_menu.id
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_menu.icon
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    @JsonProperty("iconCls")
    private String icon;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_menu.name
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    @JsonProperty("text")
    private String name;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_menu.state
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    private Integer state;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_menu.url
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    private String url;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_menu.p_id
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    private Integer pId;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_menu.id
     *
     * @return the value of t_menu.id
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_menu.id
     *
     * @param id the value for t_menu.id
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_menu.icon
     *
     * @return the value of t_menu.icon
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public String getIcon() {
        return icon;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_menu.icon
     *
     * @param icon the value for t_menu.icon
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public void setIcon(String icon) {
        this.icon = icon == null ? null : icon.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_menu.name
     *
     * @return the value of t_menu.name
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public String getName() {
        return name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_menu.name
     *
     * @param name the value for t_menu.name
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_menu.state
     *
     * @return the value of t_menu.state
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public Integer getState() {
        return state;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_menu.state
     *
     * @param state the value for t_menu.state
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public void setState(Integer state) {
        this.state = state;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_menu.url
     *
     * @return the value of t_menu.url
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public String getUrl() {
        return url;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_menu.url
     *
     * @param url the value for t_menu.url
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column t_menu.p_id
     *
     * @return the value of t_menu.p_id
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public Integer getpId() {
        return pId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column t_menu.p_id
     *
     * @param pId the value for t_menu.p_id
     *
     * @mbg.generated Thu Nov 29 22:25:03 CST 2018
     */
    public void setpId(Integer pId) {
        this.pId = pId;
    }

    @Override
    public String toString() {
        return "Menu{" +
                "checked=" + checked +
                ", attributes=" + attributes +
                ", children=" + children +
                ", id=" + id +
                ", icon='" + icon + '\'' +
                ", name='" + name + '\'' +
                ", state=" + state +
                ", url='" + url + '\'' +
                ", pId=" + pId +
                '}';
    }
}